<?php
class Categories_Model_DbTable_Categories extends Zend_Db_Table_Abstract
{
    protected $_name = 'categories';
	
	public function listAllCat($limit, $start ,$parent)
	{  	
			$query=$this->select();
    		$query->from('categories',array('ID','category_name'));   	
			$query->where('category_parent =?',$parent);			
    		$query->order('ID ASC');
			if($limit != 0)
			{
				$query->limit($limit,$start);
			}
			
    		$row= $this->fetchall($query);
    		$count = count($row);
    		if($count==0){    		
    			return $row=0;
    		}
    		else{
    			return $row->toArray();
    		}			
  
    }
}

